package com.fz.mapper;

import com.fz.entity.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by webrx on 2017-08-23.
 */
public interface StudentMapper {
    @Delete("delete from db_student where id=#{id}")
    public int deleteById(int id);

    public int delete();

    @Select("select * from db_student")
    public List<Student> query();

    public int update(Student student);

    @Insert("insert into db_student values(null,#{name},#{score},#{address})")
    public int insert(Student student);

    @Select("select * from db_student where id=#{id}")
    public Student queryById(int id);
}
